package com.tablefood.service;

import java.util.List;

import com.tablefood.domain.ShopProduct;
import com.tablefood.utils.PageProductBean;

public interface ProductService {

	//添加商品
	public boolean addProduct(ShopProduct product);
	
	//删除商品-更改销售状态
	public boolean delProduct(final Long productid);
	
	//更新商品
	public boolean updateProduct(ShopProduct product);
 
	// 检索产品名有无重复
	public boolean checkProductTitle(String title);

	//根据productid查询某件商品
	public ShopProduct searchProducts(Long productid);
     
	
	/*根据种类名categoryName计算商品展示页应展示页数*/
	public int CountProductPage(String categoryName,int pageSize);
	
 
	/*根据种类名categoryName搜索特定商品集合*/
	public List searchProducts(String categoryName,int pageIndex, int pageSize);  //多态
	
	// 分页 
	public PageProductBean queryForPage(int pageSize, int page);  
	 
 
	public int getProductsCount(String categoryName);
 
	// 查询
	public PageProductBean searchForPage(String search ,int pageSize,int page);
	
}
